﻿using System;
using Sinacor.Infra.Core.Licensing;

namespace Sinacor.Infra.Core.Licensing
{
	[Serializable]
	public class Description
	{
		string _annotation;
		DateTime? _period;
		int? _id;
		int? _licensingId;
		int? _idVersionLicensing;
		TypeDescription? _typeDescription;
		string _user;

		public string Annotation
		{
			get { return _annotation; }
			set { _annotation = value; }
		}
		public DateTime? Period
		{
			get { return _period; }
			set { _period = value; }
		}
		public int? Id
		{
			get { return _id; }
			set { _id = value; }
		}
		public int? LicensingId
		{
			get { return _licensingId; }
			set { _licensingId = value; }
		}
		public int? IdVersionLicensing
		{
			get { return _idVersionLicensing; }
			set { _idVersionLicensing = value; }
		}
		public TypeDescription? TypeDescription
		{
			get { return _typeDescription; }
			set { _typeDescription = value; }
		}
		public string User
		{
			get { return _user; }
			set { _user = value; }
		}
		public bool CanRestore
		{
			get { return (TypeDescription.HasValue && !(TypeDescription.Value == Sinacor.Infra.Core.Licensing.TypeDescription.Excluir || TypeDescription.Value == Sinacor.Infra.Core.Licensing.TypeDescription.Restaurar)); }
		}
	}
}